package com.bracketbird.client.gui.club.tournament.rtc;


import com.bracketbird.client.model.*;
import com.bracketbird.client.service.rtc.*;

/**
 *
 */
public class UpdateTeamEventHandler extends RTCClientEventHandler{
    private PlayingTeam team;
    private PlayingTeamVO teamVO;

    protected UpdateTeamEventHandler(boolean fromClient, PlayingTeam pt, PlayingTeamVO vo) {
        super(fromClient);
        this.team = pt;
        this.teamVO = vo;
    }


    @Override
    protected boolean shouldWarn() {
        return false;
    }

    @Override
    protected String getWarning() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }


    protected RTCEvent createEventToServer(){
        return RTCEventFac.createUpdateTeamEvent(team, teamVO);

    }
    protected void updateTournament(){
        RTC.getInstance().getTournament().updateTeam(team, teamVO, fromClient);

    }


}
